#MATRIXXX
#def image2matrix(name):
#    image = pygame.image.load(name + ".png")
#    print image
#    w = image.get_rect().width
#    h = image.get_rect().height
#    matrix = []
#    for j in range(h):
#        tempmatrix = []
#        for i in range(w):
#            b=image.get_at((i,j))[3] == (255)
#            if b:
#                tempmatrix.append( 1 )
#            else:
#                tempmatrix.append( 0 )
#                
#        matrix.append(tempmatrix)
#    return matrix

